package com.micro.modual.extension;

import com.micro.common.MicroConstant;
import com.micro.common.biz.GeneratorCodeUtil;
import com.micro.common.util.SnowFlakeUtil;
import com.micro.modual.entity.UserBindInfo;
import com.micro.modual.model.bo.userbindinfo.UserBindInfoBO;

/**
 * <h1>用户绑定信息表 延展类</h1>
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:23:26
 */
public class UserBindInfoExtension {

    /**
     * <h2>转换: 用户绑定信息表 新增</h2>
     * @param userBindInfoBO {@link UserBindInfoBO} 用户绑定信息表 新增/修改 请求对象
     * @return {@link UserBindInfo} 用户绑定信息表
     */
    public static UserBindInfo converAddUserBindInfo(UserBindInfoBO userBindInfoBO) {
        UserBindInfo userBindInfo = new UserBindInfo();
        userBindInfo.setId(SnowFlakeUtil.getId());
                                                            userBindInfo.setUserCode(userBindInfoBO.getUserCode());
                                                    userBindInfo.setUserEmail(userBindInfoBO.getUserEmail());
                                                    userBindInfo.setUserPhone(userBindInfoBO.getUserPhone());
                                                    userBindInfo.setUserWechat(userBindInfoBO.getUserWechat());
                                                    userBindInfo.setUserQq(userBindInfoBO.getUserQq());
                                                    userBindInfo.setUserWeibo(userBindInfoBO.getUserWeibo());
                                                    userBindInfo.setCreateTime(userBindInfoBO.getCreateTime());
                                                    userBindInfo.setUpdateTime(userBindInfoBO.getUpdateTime());
                            return userBindInfo;
    }

    /**
     * <h2>转换: 用户绑定信息表 修改</h2>
     * @param userBindInfoBO {@link UserBindInfoBO} 用户绑定信息表 新增/修改 请求对象
     * @return {@link UserBindInfo} 用户绑定信息表
     */
    public static UserBindInfo converEditUserBindInfo(UserBindInfoBO userBindInfoBO) {
        UserBindInfo userBindInfo = new UserBindInfo();
        userBindInfo.setId(userBindInfoBO.getId());
                                                        userBindInfo.setUserCode(userBindInfoBO.getUserCode());
                                                userBindInfo.setUserEmail(userBindInfoBO.getUserEmail());
                                                userBindInfo.setUserPhone(userBindInfoBO.getUserPhone());
                                                userBindInfo.setUserWechat(userBindInfoBO.getUserWechat());
                                                userBindInfo.setUserQq(userBindInfoBO.getUserQq());
                                                userBindInfo.setUserWeibo(userBindInfoBO.getUserWeibo());
                                                userBindInfo.setCreateTime(userBindInfoBO.getCreateTime());
                                                userBindInfo.setUpdateTime(userBindInfoBO.getUpdateTime());
                            return userBindInfo;
    }
}
